Dynomotion

Group: DynoMotion Message: 6345 From: fireup_kev Date: 12/29/2012
Subject: CompileAndLoadCoff - Compiled info
Using CompileAndLoadCoff in .NET, How can I get the compiled information (memory used) when there's no error in the C program?
Group: DynoMotion Message: 6349 From: Tom Kerekes Date: 12/29/2012
Subject: Re: CompileAndLoadCoff - Compiled info
Hi Kevin,

There is a function in KMotionDLL.dll that will return the section sizes of a specified coff (.out) file.  It looks like we forgot to export it from KMotion_dotNet.  We will include this in the next Version.  You can always in KMotion.exe to check the size.

It is already interfaced through KMotion_dotNet_Interop.dll to C#.

       [DllImport("KMotion_dotNet_Interop.dll")]
        static extern int KM_dotnet_Interop_CheckCoffSize(IntPtr handle, string name, ref int size_text, ref int size_bss, ref int size_data,ref int size_total);

Regards
TK

Group: DynoMotion Message: 6351 From: fireup_kev Date: 12/29/2012
Subject: Re: CompileAndLoadCoff - Compiled info
Thanks, I added a "CheckCoffSize" method to KMoiton_dotNet.dll myself but would be great to have it in future version.

--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Kevin,
>
> There is a function in KMotionDLL.dll that will return the section sizes of a specified coff (.out) file.  It looks like we forgot to export it from KMotion_dotNet.  We will include this in the next Version.  You can always in KMotion.exe to check the size.
>
>
> It is already interfaced through KMotion_dotNet_Interop.dll to C#.
>
>
>        [DllImport("KMotion_dotNet_Interop.dll")]
>         static extern int KM_dotnet_Interop_CheckCoffSize(IntPtr handle, string name, ref int size_text, ref int size_bss, ref int size_data,ref int size_total);
>
>
> Regards
> TK
>
>
>
> ________________________________
> From: fireup_kev <kliboon@...>
> To: DynoMotion@yahoogroups.com
> Sent: Saturday, December 29, 2012 12:31 PM
> Subject: [DynoMotion] CompileAndLoadCoff - Compiled info
>
>
>  
> Using CompileAndLoadCoff in .NET, How can I get the compiled information (memory used) when there's no error in the C program?
>
Group: DynoMotion Message: 6354 From: Tom Kerekes Date: 12/30/2012
Subject: Re: CompileAndLoadCoff - Compiled info
Hi Kevin,

If possible please send us the modified file or an SVN Patch.

Thanks
TK


Group: DynoMotion Message: 6357 From: fireup_kev Date: 12/30/2012
Subject: Re: CompileAndLoadCoff - Compiled info
Here's the method I added right after GetFirmwareVersion() in KM_Controller.cs


public int CheckCoffSize(string name, out int size_text, out int size_bss, out int size_data, out int size_total)
{
try
{
int text = 0;
int bss = 0;
int data = 0;
int total = 0;

var result = KM_dotnet_Interop_CheckCoffSize(_InstanceHandle, name, ref text, ref bss, ref data, ref total);
size_text = text;
size_bss = bss;
size_data = data;
size_total = total;
return result;
}
catch (DllNotFoundException e)
{
throw new DMException(this, e, String.Format("Dll Not Found Exception thrown : Caller - [{0}] :: Member - [{1}]",
this.ToString(), "CheckCoffSize"));
}
catch (EntryPointNotFoundException e)
{
throw new DMException(this, e, String.Format("Entry Point Not Found Exception thrown : Caller - [{0}] :: Member - [{1}]",
this.ToString(), "CheckCoffSize"));
}
catch (Exception e)
{
throw new DMException(this, e, String.Format("General Exception thrown : Caller - [{0}] :: Member - [{1}]",
this.ToString(), "CheckCoffSize"));
}
}


--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Kevin,
>
> If possible please send us the modified file or an SVN Patch.
>
> Thanks
> TK
>
>
>
>
> ________________________________
> From: fireup_kev <kliboon@...>
> To: DynoMotion@yahoogroups.com
> Sent: Saturday, December 29, 2012 11:55 PM
> Subject: [DynoMotion] Re: CompileAndLoadCoff - Compiled info
>
>
>  
> Thanks, I added a "CheckCoffSize" method to KMoiton_dotNet.dll myself but would be great to have it in future version.
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Kevin,
> >
> > There is a function in KMotionDLL.dll that will return the section sizes of a specified coff (.out) file.  It looks like we forgot to export it from KMotion_dotNet.  We will include this in the next Version.  You can always in KMotion.exe to check the size.
> >
> >
> > It is already interfaced through KMotion_dotNet_Interop.dll to C#.
> >
> >
> >        [DllImport("KMotion_dotNet_Interop.dll")]
> >         static extern int KM_dotnet_Interop_CheckCoffSize(IntPtr handle, string name, ref int size_text, ref int size_bss, ref int size_data,ref int size_total);
> >
> >
> > Regards
> > TK
> >
> >
> >
> > ________________________________
> > From: fireup_kev <kliboon@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Saturday, December 29, 2012 12:31 PM
> > Subject: [DynoMotion] CompileAndLoadCoff - Compiled info
> >
> >
> >  
> > Using CompileAndLoadCoff in .NET, How can I get the compiled information (memory used) when there's no error in the C program?
> >
>
Group: DynoMotion Message: 6361 From: Tom Kerekes Date: 12/31/2012
Subject: Re: CompileAndLoadCoff - Compiled info
Thanks Kevin

TK